﻿@model PageableModel<ListArticleModel>

@{
    ViewBag.Title = "Index";
}

<div class="folder">
    <div class="folder-heading">
        <h2 class="left">@Loc("Articles")</h2>

        <div class="grid-paging right">
            @Html.DisplayFor(m => m.PagingInfo)
        </div>
        <div class="clear"></div>
    </div>

    @{
        
        UI.Grid(Model.Items)
            .SetEmptyText((L)"No articles")
            .AddColumn((L)"ID", a => a.ID, "w30")
            .AddColumn((L)"Title", a => a.Title)
            .AddColumn((L)"Lang", a => a.Culture == "cs" ? (L)"Czech" : (L)"English", "w30")
            .AddColumn((L)"Modified", a => a.Modified, "w110")
            .AddColumn((L)"Author", a => a.AuthorFullname, "w100")
            .AddColumn("", a => Html.ActionLink((L)"Edit", "edit", new { id = a.ID }) + " " + UI.DeleteLink((L)"Delete", "delete", new { id = a.ID }), "w70")
            .Render();
    }

    <div class="folder-foot">
        @Html.ActionLink((L)"+Create", "create")
    </div>
</div>
